import { defineStore } from 'pinia';
// @ts-ignore
export const useUserStore = defineStore('user', {
  state: (): {
    user: any | null;
  } => ({
    user: null,
  }),
  actions: {
    setUser(userData: any) {
      this.user = userData;
    },
  },
  persist: {
    key: 'userStore',
    storage: sessionStorage,
    paths: ['user'],
  },
});